<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Language" content="zh-CN" />
<meta content="all" name="robots" />
<meta name="author" content="" />
<meta name="Copyright" content="" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<link rel="icon" href="/favicon.ico" type="image/x-icon" />
<title>测试</title>
</head>
<body>
<div class="wrapper">

 <form id="importForm" name="importForm" method="post" enctype="multipart/form-data">
      <p class="p-item p-errTip"></p>
      <p class="p-item">
          <label class="lab-item col_2"><em class="em-rq">*</em>上传文件：</label>
          <input type='text' readonly="readonly" name='textfield' e id='textfield' class='txt' style="width:200px;"/>
          <input type='button'  id="uploadButton" class="s-upload-button" value='选择excel文件' />
      </p>
      <br />
      <p class="p-item p-formbtn"><input type="button" id="uploadSubmit" value="导入" class="btn btn-formSubmit">
</form>


</div>

<script type="text/javascript" src="js/jquery-1.8.2.min.js"></script>
<script type="text/javascript" src="soUpload.js"></script>
<script type="text/javascript">
var tUpload = $.soUpload({
    action : 'testIframe.html',
    //action : 'testIframeFail.html',
    fileName : 'file',
    upBtn :'#uploadButton',
    nameText : '#textfield',
    accept : ['.doc','.xlsx'],//只接受excel格式
    submitBrn : '#uploadSubmit',
    emptyMsg : '请上传excel文件',
    submit : function () {
      tUpload.updateParams({id:121,name:'test'});
    },
    complete : function (data) {
      if (data) {
        if (data.success) {
            $('.p-errTip').text('');
            alert('文件已导入成功！');
        }else{
          //window.console && console.log(data);
          $('.p-errTip').text(data.message);
        };
      };
    }
});
</script>

<script type="text/javascript">
//ga
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

  ga('create', 'UA-56955204-1', 'auto');
  ga('send', 'pageview');

//baidu
var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "//hm.baidu.com/hm.js?91f551b2f68716f7104f1c46a09b74af";
  var s = document.getElementsByTagName("script")[0];
  s.parentNode.insertBefore(hm, s);
})();

</script>

</body>
</html>